package com.xcc.queue;

/**
 * @Description 循环队列练习
 * @Author xiechuang
 * @Date 2021/10/23
 */
public class CircularQueueDemo {

    public static void main(String[] args) {
        MyCircularQueue circularQueue = new MyCircularQueue(3);
        System.out.println("queue size 3");
        System.out.println("insert value   is success？ " + circularQueue.enQueue(1));
        System.out.println("insert value   is success？ " + circularQueue.enQueue(2));
        System.out.println("insert value   is success？ " + circularQueue.enQueue(3));
        System.out.println("insert value   queue is full   is success？ " + circularQueue.enQueue(4));
        System.out.println("get tail value：" + circularQueue.rear());
        System.out.println("queue is full？ " + circularQueue.isFull());
        System.out.println("delete value   is success？ " + circularQueue.deQueue());
        System.out.println("insert value   is success？ " + circularQueue.enQueue(4));
        System.out.println("get tail value：" + circularQueue.rear());
    }

}
